const Koa = require("koa");
const cors = require("koa2-cors");
const sslify = require("koa-sslify").default;
const bodyParser = require("koa-bodyparser");
const errorHeanle = require("../app/error-handle");
const allRouter = require("../router");
const app = new Koa();

app.use(sslify());
app.use(cors());
app.use(bodyParser());
app.on("error", errorHeanle);
allRouter(app);
module.exports = app;
